home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 352_01.zip / READ.ME < prev    next >
Text File  |  1993-04-10  |  3KB  |  70 lines

  1. READ.ME - introduction to some C++ code submited to the CUG.
  2.  
  3. This disk contains DBLIB.H and VECTOR.H, written for TURBO C++
  4.  
  5. DBLIB.H -
  6.     There are 2 main classes defined here, plus some 
  7.     miscellaneous routines that may be considered to be 
  8.     'extensions' to the WTWG windows package. WTWG is available 
  9.     through the C user's group.
  10.     
  11.     class String {...} provides BASIC-like string processing for 
  12.     C++ programs. see the demo program STRDEMO.CPP on this disk.
  13.     
  14.     class Vlist {...} provides a flexible array of pointers to 
  15.     data objects. The usefullness of this class can be seen in 
  16.     the routines wildfile() and wildfile_pick() which are in the 
  17.     files wildfile.cpp and wildpick.cpp, or in the demo program 
  18.     subdir (which is in subdir.cpp).
  19.  
  20.     miscellaneous functions using the above classes are included, 
  21.     such as wildfile() and wildfile_pick() which handle directory 
  22.     listings for WTWG windows programs, make_fullfilename() which 
  23.     concatenates and validates the parts of a DOS filename, and 
  24.     some WFORM validation routines for use with the WTWG 
  25.     wscanform() routine.
  26.         
  27. VECTOR.H - 
  28.     This defines a class Vector {...} which is a glorified array 
  29.     of floats. Vector arithmetic, inner products, norms, etc are 
  30.     supported. There is also class CVector {...} which provides 
  31.     for arrays of complex numbers. Note that CVector stores all 
  32.     the real parts together and all the imaginary parts together, 
  33.     which is more usefull for graphing results, etc than storing 
  34.     alternating real/imag. 
  35.     
  36.         
  37. NOTES ON USE OF THESE CLASSES:
  38.     1) both classes use the WTWG library for memory 
  39.     allocation. You can override the calls to wmalloc() and 
  40.     to wrealloc() as shown in the demo program subdir.cpp, so 
  41.     you can use these classes without using WTWG if you like.
  42.         
  43.     2) You can derive a fixed length version of Vlist (ie: to 
  44.     store fixed length data structures instead of variable 
  45.     length strings) if you provide your own versions of the 
  46.     virtual functions Vlist::copy() and Vlist::compare(). 
  47.     Also, you can further derive other list managers for any 
  48.     other C++ classes you should make up, so Vlist provides a 
  49.     dynamically allocated array of any type of object. This 
  50.     is a good way to learn C++ and it's easy, so I left it 
  51.     for you.
  52.         
  53.     3) member functions that return newly created objects 
  54.     return pointers to the objects, which must be explicitly 
  55.     deleted (see strdemo.cpp for example of 
  56.     String::tokenize()). Although this is less elegant and 
  57.     more error-prone than passing back the actual newly 
  58.     created object, it is VASTLY more efficient. 
  59.         
  60.     4) These classes are my first real use of C++. Those of you 
  61.     who are more experienced C++ programmers might find much to 
  62.     complain about, and if so I would like to hear from you. I 
  63.     can be reached by regular mail:
  64.  
  65.                            David Blum
  66.                       8039 North 1st Street
  67.                      Phoeniz, Arizona  85020    
  68.     
  69.         
  70.